Dialog Resource

The DIALOG statement defines a window that an application can use to create dialog boxes. The statement defines the position and dimensions of the dialog box on the screen as well as the dialog box style.

Syntax

nameID DIALOG [load-mem] x, y, width, height
   [option-statements]
   BEGIN
      control-statement
      . . .
   END

Parameters

nameID

Identifies the dialog box. This is either a unique name or a unique 16-bit unsigned integer value in the range 1 to 65,535.

load-mem

Specifies loading and memory attributes for the resource.

option-statements

Specifies options for the dialog box. This can be zero or more of the following statements:

Statement

Description

CAPTION "text"

Specifies the caption of the dialog box if it has a title bar.

CHARACTERISTICS dword

Specifies a user-defined double-word value for use by resource tools. This value is not used by Windows.

CLASS class

Specifies a 16-bit unsigned integer or a string, enclosed in double quotation marks ("), that identifies the class of the dialog box.

LANGUAGE language,sublanguage

Specifies the language of the dialog box.

STYLE styles

Specifies the styles of the dialog box.

EXSTYLE extended-styles

Specifies the extended styles of the dialog box.

VERSION dword

Specifies a user-defined doubleword value. This statement is intended for use by additional resource tools and is not used by Windows.

 

Example

The following demonstrates the usage of the DIALOG statement:

ErrorDialog DIALOG 10, 10, 300, 110
STYLE WS_POPUP|WS_BORDER
CAPTION "Error!"
BEGIN
CTEXT "Select One:", 1, 10, 10, 280, 12
PUSHBUTTON "&Retry", 2, 75, 30, 60, 12
PUSHBUTTON "&Abort", 3, 75, 50, 60, 12
PUSHBUTTON "&Ignore", 4, 75, 80, 60, 12
END